package com.example.lenovo.appstore.activity;

import android.graphics.Color;
import android.os.Bundle;

import com.example.lenovo.appstore.utils.StatusBarUtil;
import com.example.lenovo.appstore.view.TitleBarView;
import com.google.android.material.floatingactionbutton.FloatingActionButton;
import com.google.android.material.snackbar.Snackbar;

import androidx.appcompat.app.AppCompatActivity;
import androidx.appcompat.widget.Toolbar;
import butterknife.Bind;
import butterknife.ButterKnife;

import android.view.View;
import android.view.WindowManager;
import android.widget.CheckBox;
import android.widget.TextView;

import com.example.lenovo.appstore.R;

public class UserInfoActivity extends AppCompatActivity {
    @Bind(R.id.boy)
    CheckBox boy;
    @Bind(R.id.guy)
    CheckBox guy;
    @Bind(R.id.index_titleBar)
    TitleBarView index_titleBar;
    TextView tv_titlebar_right;

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_user_info);
        ButterKnife.bind(this);
        StatusBarUtil.immersive(this);
        StatusBarUtil.setStatusBarLightMode(getWindow());

        getWindow().setSoftInputMode(
                WindowManager.LayoutParams.SOFT_INPUT_STATE_ALWAYS_HIDDEN);
        guy.setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View v) {
                if (guy.isChecked()) {
                    boy.setChecked(false);
                } else {
                    boy.setChecked(true);
                }
            }
        });
        boy.setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View v) {
                if (boy.isChecked()) {
                    guy.setChecked(false);
                } else {
                    guy.setChecked(true);
                }
            }
        });
        tv_titlebar_right = index_titleBar.getTvTitlebarRight();
        tv_titlebar_right.setVisibility(View.VISIBLE);
        tv_titlebar_right.setText("保存");
        tv_titlebar_right.setTextSize(14);
        tv_titlebar_right.setTextColor(Color.parseColor("#363636"));
        tv_titlebar_right.setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View v) {

            }
        });
        index_titleBar.setTitle("个人信息");
    }

}
